<?php
declare (strict_types = 1);

namespace app\common\validate;

use think\Validate;
class StudyStudentRecipes extends Validate
{
    protected $rule = ['recipes_img' => 'require',
    ];

    protected $message = ['class_id.require' => '班级ID为必填项','class_id.number' => '班级ID需为数字','recipes_img.require' => '食谱图片为必填项',
    ];

    /**
     * 添加
     */
    public function sceneAdd()
    {
        return $this->only(['class_id','recipes_img',]);
    }

    /**
     * 编辑
     */
    public function sceneEdit()
    {
        return $this->only(['class_id','recipes_img',]);
    }
}
